
var floor: GameObject;
var skip: float;

function Update () {
	
	this.name = "player";
	
	if(floor)
	{
		Init();
	}
}

function Init()
{	
	var info: Collision;
	
	if(info)
	{
		OnCollisionEnter (info);
	}
}

function OnCollisionEnter (collitionInfo: Collision)
{
	//Debug.Log("Collision santa-floor was detected");
	
	if(skip < 80)
	{
		skip += 55;
	}
		
	this.rigidbody.AddForce(0, skip, 0);
	//this.transform.Translate(0, 0, 0);
	this.rigidbody.angularVelocity = Vector3(0, 0, 0);
}